home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / dday.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  16KB  |  457 lines

  1. /***************************************************************************
  2.  
  3. D-Day
  4.  
  5. driver by Zsolt Vasvari
  6.  
  7.  
  8. Note: This game doesn't seem to support cocktail mode, which is not too
  9.       suprising for a gun game.
  10.  
  11. 0000-3fff ROM
  12. 5000-53ff Foreground RAM 1
  13. 5400-57ff Foreground RAM 2
  14. 5800-5bff Background RAM (Only the first 28 lines are visible,
  15.                           the last 0x80 bytes probably contain color
  16.                           information)
  17. 5c00-5fff Attributes RAM for Foreground 2
  18.           A0-A4 seem to be ignored.
  19.           D0 - X Flip
  20.           D2 - Used by the software to separate area that the short shots
  21.                cannot penetrate
  22.           Others unknown, they don't seem to be used by this game
  23. 6000-63ff RAM
  24.  
  25. read:
  26.  
  27. 6c00  Input Port #1
  28. 7000  Dip Sw #1
  29. 7400  Dip Sw #2
  30. 7800  Timer
  31. 7c00  Analog Control
  32.  
  33. write:
  34.  
  35. 4000 Search light image and flip
  36. 6400 AY8910 #1 Control Port
  37. 6401 AY8910 #1 Write Port
  38. 6800 AY8910 #2 Control Port
  39. 6801 AY8910 #2 Write Port
  40. 7800 Bit 0 - Coin Counter 1
  41.      Bit 1 - Coin Counter 2
  42.      Bit 2 - ??? Pulsated when the player is hit
  43.      Bit 3 - ??? Seems to be unused
  44.      Bit 4 - Tied to AY8910 RST. Used to turn off sound
  45.      Bit 5 - ??? Seem to be always on
  46.      Bit 6 - Search light enable
  47.      Bit 7 - ???
  48.  
  49.  
  50. ***************************************************************************/
  51.  
  52. #include "driver.h"
  53. #include "vidhrdw/generic.h"
  54.  
  55. extern unsigned char *dday_videoram2;
  56. extern unsigned char *dday_videoram3;
  57.  
  58. void dday_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  59. void dday_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  60. WRITE_HANDLER( dday_colorram_w );
  61. READ_HANDLER( dday_colorram_r );
  62. WRITE_HANDLER( dday_control_w );
  63. WRITE_HANDLER( dday_searchlight_w );
  64. void dday_decode(void);
  65.  
  66.  
  67. // Note: There seems to be no way to reset this timer via hardware.
  68. //       The game uses a difference method to reset it to 99.
  69. //
  70. // Thanks Zwaxy for the timer info.
  71.  
  72. #define START_TIMER 99
  73. static int timerVal = START_TIMER;
  74.  
  75. static READ_HANDLER( dday_timer_r )
  76. {
  77.     return ((timerVal / 10) << 4) | (timerVal % 10);
  78. }
  79.  
  80. // This is not a real interrupt routine. It is just used to decrement the
  81. // counter.
  82. static int dday_interrupt (void)
  83. {
  84.     #define START_TIMER_SMALL 60
  85.     static int timerValSmall = START_TIMER_SMALL;
  86.     /* if the timer hits zero, start over at START_TIMER */
  87.     timerValSmall--;
  88.     if (timerValSmall == 0)
  89.     {
  90.         timerValSmall = START_TIMER_SMALL;
  91.         timerVal--;
  92.         if (timerVal == -1) timerVal = START_TIMER;
  93.     }
  94.  
  95.     return ignore_interrupt();
  96. }
  97.  
  98. static struct MemoryReadAddress readmem[] =
  99. {
  100.     { 0x0000, 0x3fff, MRA_ROM },
  101.     { 0x5000, 0x5bff, MRA_RAM },
  102.     { 0x5c00, 0x5fff, dday_colorram_r },
  103.     { 0x6000, 0x63ff, MRA_RAM },
  104.     { 0x6c00, 0x6c00, input_port_0_r },
  105.     { 0x7000, 0x7000, input_port_1_r },
  106.     { 0x7400, 0x7400, input_port_2_r },
  107.     { 0x7800, 0x7800, dday_timer_r },
  108.     { 0x7c00, 0x7c00, input_port_3_r },
  109.     { -1 }  /* end of table */
  110. };
  111.  
  112. static struct MemoryWriteAddress writemem[] =
  113. {
  114.     { 0x0000, 0x3fff, MWA_ROM },
  115.     { 0x4000, 0x4000, dday_searchlight_w },
  116.     { 0x5000, 0x53ff, MWA_RAM, &dday_videoram2 },
  117.     { 0x5400, 0x57ff, MWA_RAM, &dday_videoram3 },
  118.     { 0x5800, 0x5bff, MWA_RAM, &videoram, &videoram_size },
  119.     { 0x5c00, 0x5fff, dday_colorram_w, &colorram },
  120.     { 0x6000, 0x63ff, MWA_RAM },
  121.     { 0x6400, 0x6400, AY8910_control_port_0_w },
  122.     { 0x6401, 0x6401, AY8910_write_port_0_w },
  123.     { 0x6402, 0x6402, AY8910_control_port_0_w },
  124.     { 0x6403, 0x6403, AY8910_write_port_0_w },
  125.     { 0x6404, 0x6404, AY8910_control_port_0_w },
  126.     { 0x6405, 0x6405, AY8910_write_port_0_w },
  127.     { 0x6406, 0x6406, AY8910_control_port_0_w },
  128.     { 0x6407, 0x6407, AY8910_write_port_0_w },
  129.     { 0x6408, 0x6408, AY8910_control_port_0_w },
  130.     { 0x6409, 0x6409, AY8910_write_port_0_w },
  131.     { 0x640a, 0x640a, AY8910_control_port_0_w },
  132.     { 0x640b, 0x640b, AY8910_write_port_0_w },
  133.     { 0x640c, 0x640c, AY8910_control_port_0_w },
  134.     { 0x640d, 0x640d, AY8910_write_port_0_w },
  135.     { 0x6800, 0x6800, AY8910_control_port_1_w },
  136.     { 0x6801, 0x6801, AY8910_write_port_1_w },
  137.     { 0x7800, 0x7800, dday_control_w },
  138.     { -1 }  /* end of table */
  139. };
  140.  
  141.  
  142.  
  143. INPUT_PORTS_START( dday )
  144.     PORT_START      /* IN 0 */
  145.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
  146.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
  147.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Fire Button
  148.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 )
  149.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  150.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
  151.     PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Doesn't seem to be
  152.                                                   // accessed
  153.     PORT_START      /* DSW 0 */
  154.     PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
  155.     PORT_DIPSETTING(    0x00, "2" )
  156.     PORT_DIPSETTING(    0x01, "3" )
  157.     PORT_DIPSETTING(    0x02, "4" )
  158.     PORT_DIPSETTING(    0x03, "5" )
  159.     PORT_DIPNAME( 0x0c, 0x00, "Extended Play At" )
  160.     PORT_DIPSETTING(    0x00, "10000" )
  161.     PORT_DIPSETTING(    0x04, "15000" )
  162.     PORT_DIPSETTING(    0x08, "20000" )
  163.     PORT_DIPSETTING(    0x0c, "25000" )
  164.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
  165.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  166.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  167.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
  168.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  169.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  170.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  171.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  172.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  173.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )  // has to do with lives
  174.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  175.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  176.  
  177.     PORT_START      /* DSW 1 */
  178.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  179.     PORT_DIPSETTING(    0x0e, DEF_STR( 2C_1C ) )
  180.     PORT_DIPSETTING(    0x0c, DEF_STR( 2C_2C ) )
  181.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  182.     PORT_DIPSETTING(    0x0a, DEF_STR( 2C_3C ) )
  183.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_4C ) )
  184.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_2C ) )
  185.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  186.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_6C ) )
  187.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_3C ) )
  188.     PORT_DIPSETTING(    0x02, DEF_STR( 2C_7C ) )
  189.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_8C ) )
  190.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_4C ) )
  191.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_5C ) )
  192.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
  193.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_7C ) )
  194.     PORT_DIPSETTING(    0x01, DEF_STR( 1C_8C ) )
  195.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  196.     PORT_DIPSETTING(    0xe0, DEF_STR( 2C_1C ) )
  197.     PORT_DIPSETTING(    0xc0, DEF_STR( 2C_2C ) )
  198.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  199.     PORT_DIPSETTING(    0xa0, DEF_STR( 2C_3C ) )
  200.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_4C ) )
  201.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_2C ) )
  202.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  203.     PORT_DIPSETTING(    0x40, DEF_STR( 2C_6C ) )
  204.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_3C ) )
  205.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_7C ) )
  206.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_8C ) )
  207.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_4C ) )
  208.     PORT_DIPSETTING(    0x70, DEF_STR( 1C_5C ) )
  209.     PORT_DIPSETTING(    0x50, DEF_STR( 1C_6C ) )
  210.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_7C ) )
  211.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_8C ) )
  212.  
  213.     PORT_START      /* IN1 */
  214.     PORT_ANALOG(0xff, 96, IPT_PADDLE, 20, 10, 0, 191 )
  215. INPUT_PORTS_END
  216.  
  217. INPUT_PORTS_START( ddayc )
  218.     PORT_START      /* IN 0 */
  219.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
  220.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
  221.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Fire Button
  222.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 )
  223.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
  224.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // Distance Button
  225.     PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Doesn't seem to be
  226.                                                   // accessed
  227.     PORT_START      /* DSW 0 */
  228.     PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
  229.     PORT_DIPSETTING(    0x00, "2" )
  230.     PORT_DIPSETTING(    0x01, "3" )
  231.     PORT_DIPSETTING(    0x02, "4" )
  232.     PORT_DIPSETTING(    0x03, "5" )
  233.     PORT_DIPNAME( 0x0c, 0x00, "Extended Play At" )
  234.     PORT_DIPSETTING(    0x00, "4000" )
  235.     PORT_DIPSETTING(    0x04, "6000" )
  236.     PORT_DIPSETTING(    0x08, "8000" )
  237.     PORT_DIPSETTING(    0x0c, "10000" )
  238.     PORT_DIPNAME( 0x30, 0x10, DEF_STR( Difficulty ) )
  239.     PORT_DIPSETTING(    0x30, "Easy" )   // Easy   - No Bombs, No Troop Carriers
  240.     PORT_DIPSETTING(    0x20, "Normal" ) // Normal - No Bombs, Troop Carriers
  241.     PORT_DIPSETTING(    0x10, "Hard" )   // Hard   - Bombs, Troop Carriers
  242. //PORT_DIPSETTING(    0x00, "Hard" ) // Same as 0x10
  243.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) // Doesn't seem to be used
  244.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  245.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  246.     PORT_DIPNAME( 0x80, 0x80, "Start with 20000 Pts" )
  247.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  248.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  249.  
  250.     PORT_START      /* DSW 1 */
  251.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  252.     PORT_DIPSETTING(    0x0e, DEF_STR( 2C_1C ) )
  253.     PORT_DIPSETTING(    0x0c, DEF_STR( 2C_2C ) )
  254.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  255.     PORT_DIPSETTING(    0x0a, DEF_STR( 2C_3C ) )
  256.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_4C ) )
  257.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_2C ) )
  258.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  259.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_6C ) )
  260.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_3C ) )
  261.     PORT_DIPSETTING(    0x02, DEF_STR( 2C_7C ) )
  262.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_8C ) )
  263.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_4C ) )
  264.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_5C ) )
  265.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
  266.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_7C ) )
  267.     PORT_DIPSETTING(    0x01, DEF_STR( 1C_8C ) )
  268.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  269.     PORT_DIPSETTING(    0xe0, DEF_STR( 2C_1C ) )
  270.     PORT_DIPSETTING(    0xc0, DEF_STR( 2C_2C ) )
  271.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  272.     PORT_DIPSETTING(    0xa0, DEF_STR( 2C_3C ) )
  273.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_4C ) )
  274.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_2C ) )
  275.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  276.     PORT_DIPSETTING(    0x40, DEF_STR( 2C_6C ) )
  277.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_3C ) )
  278.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_7C ) )
  279.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_8C ) )
  280.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_4C ) )
  281.     PORT_DIPSETTING(    0x70, DEF_STR( 1C_5C ) )
  282.     PORT_DIPSETTING(    0x50, DEF_STR( 1C_6C ) )
  283.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_7C ) )
  284.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_8C ) )
  285.  
  286.     PORT_START      /* IN1 */
  287.     PORT_ANALOG(0xff, 96, IPT_PADDLE, 20, 10, 0, 191 )
  288. INPUT_PORTS_END
  289.  
  290.  
  291.  
  292. static struct GfxLayout charlayout =
  293. {
  294.     8,8,    /* 8*8 characters */
  295.     256,    /* 256 characters */
  296.     2,      /* 2 bits per pixel */
  297.     { 0, 0x0800*8 }, /* the two bitplanes are separated */
  298.     { 7, 6, 5, 4, 3, 2, 1, 0 },
  299.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  300.     8*8     /* every char takes 8 consecutive bytes */
  301. };
  302.  
  303. static struct GfxLayout charlayout_flipx =
  304. {
  305.     8,8,    /* 8*8 characters */
  306.     256,    /* 256 characters */
  307.     2,      /* 2 bits per pixel */
  308.     { 0, 0x0800*8 }, /* the two bitplanes are separated */
  309.     { 0, 1, 2, 3, 4, 5, 6, 7 },
  310.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  311.     8*8     /* every char takes 8 consecutive bytes */
  312. };
  313.  
  314. static struct GfxDecodeInfo gfxdecodeinfo[] =
  315. {
  316.     { REGION_GFX1, 0, &charlayout,        0, 8 },
  317.     { REGION_GFX2, 0, &charlayout,       32, 8 },
  318.     { REGION_GFX3, 0, &charlayout,       64, 8 },
  319.     { REGION_GFX3, 0, &charlayout_flipx, 64, 8 },
  320.     { -1 } /* end of array */
  321. };
  322.  
  323.  
  324.  
  325. static struct AY8910interface ay8910_interface =
  326. {
  327.     2,      /* 2 chips */
  328.     1000000,    /* 1.0 MHz ? */
  329.     { 25, 25 },
  330.     { 0 },
  331.     { 0 },
  332.     { 0 },
  333.     { 0 }
  334. };
  335.  
  336.  
  337. static struct MachineDriver machine_driver_dday =
  338. {
  339.     /* basic machine hardware */
  340.     {
  341.         {
  342.             CPU_Z80,
  343.             2000000,     /* 2 Mhz ? */
  344.             readmem,writemem,0,0,
  345.             dday_interrupt,1
  346.         }
  347.     },
  348.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
  349.     1,      /* single CPU, no need for interleaving */
  350.     0,
  351.  
  352.     /* video hardware */
  353.     32*8, 32*8, { 0*8, 32*8-1, 0*8, 28*8-1 },
  354.     gfxdecodeinfo,
  355.     512,512,
  356.     dday_vh_convert_color_prom,
  357.  
  358.     VIDEO_TYPE_RASTER,
  359.     0,
  360.     generic_vh_start,
  361.     generic_vh_stop,
  362.     dday_vh_screenrefresh,
  363.  
  364.     /* sound hardware */
  365.     0,0,0,0,
  366.     {
  367.         {
  368.             SOUND_AY8910,
  369.             &ay8910_interface
  370.         }
  371.     }
  372. };
  373.  
  374.  
  375.  
  376. /***************************************************************************
  377.  
  378.   Game driver(s)
  379.  
  380. ***************************************************************************/
  381.  
  382. ROM_START( dday )
  383.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  384.     ROM_LOAD( "e8_63co.bin",  0x0000, 0x1000, 0x13d53793 )
  385.     ROM_LOAD( "e7_64co.bin",  0x1000, 0x1000, 0xe1ef2a70 )
  386.     ROM_LOAD( "e6_65co.bin",  0x2000, 0x1000, 0xfe414a83 )
  387.     ROM_LOAD( "e5_66co.bin",  0x3000, 0x1000, 0xfc9f7774 )
  388.  
  389.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  390.     ROM_LOAD( "k2_71.bin",    0x0000, 0x0800, 0xf85461de )
  391.     ROM_LOAD( "k3_72.bin",    0x0800, 0x0800, 0xfdfe88b6 )
  392.  
  393.     ROM_REGION( 0x1000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  394.     ROM_LOAD( "j8_70co.bin",  0x0000, 0x0800, 0x0c60e94c )
  395.     ROM_LOAD( "j9_69co.bin",  0x0800, 0x0800, 0xba341c10 )
  396.  
  397.     ROM_REGION( 0x1000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  398.     ROM_LOAD( "k6_74o.bin",   0x0000, 0x0800, 0x66719aea )
  399.     ROM_LOAD( "k7_75o.bin",   0x0800, 0x0800, 0x5f8772e2 )
  400.  
  401.     ROM_REGION( 0x2000, REGION_GFX4 )      /* search light */
  402.     ROM_LOAD( "d2_67.bin",    0x0000, 0x1000, 0x2b693e42 )  /* layout */
  403.     ROM_LOAD( "d4_68.bin",    0x1000, 0x0800, 0xf3649264 )  /* mask */
  404.                             /*0x1800 -0x1fff will be filled in dynamically */
  405.  
  406.     ROM_REGION( 0x0800, REGION_GFX5 )      /* layer mask */
  407.     ROM_LOAD( "k4_73.bin",    0x0000, 0x0800, 0xfa6237e4 )
  408.  
  409.     ROM_REGION( 0x0300, REGION_PROMS )
  410.     ROM_LOAD( "dday.m11",     0x0000, 0x0100, 0xaef6bbfc )  /* red component */
  411.     ROM_LOAD( "dday.m8",      0x0100, 0x0100, 0xad3314b9 )  /* green component */
  412.     ROM_LOAD( "dday.m3",      0x0200, 0x0100, 0xe877ab82 )  /* blue component */
  413. ROM_END
  414.  
  415. ROM_START( ddayc )
  416.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  417.     ROM_LOAD( "e8_63-c.bin",  0x0000, 0x1000, 0xd4fa3ae3 )
  418.     ROM_LOAD( "e7_64-c.bin",  0x1000, 0x1000, 0x9fb8b1a7 )
  419.     ROM_LOAD( "e6_65-c.bin",  0x2000, 0x1000, 0x4c210686 )
  420.     ROM_LOAD( "e5_66-c.bin",  0x3000, 0x1000, 0xe7e832f9 )
  421.  
  422.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  423.     ROM_LOAD( "k2_71.bin",    0x0000, 0x0800, 0xf85461de )
  424.     ROM_LOAD( "k3_72.bin",    0x0800, 0x0800, 0xfdfe88b6 )
  425.  
  426.     ROM_REGION( 0x1000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  427.     ROM_LOAD( "j8_70-c.bin",  0x0000, 0x0800, 0xa0c6b86b )
  428.     ROM_LOAD( "j9_69-c.bin",  0x0800, 0x0800, 0xd352a3d6 )
  429.  
  430.     ROM_REGION( 0x1000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  431.     ROM_LOAD( "k6_74.bin",    0x0000, 0x0800, 0xd21a3e22 )
  432.     ROM_LOAD( "k7_75.bin",    0x0800, 0x0800, 0xa5e5058c )
  433.  
  434.     ROM_REGION( 0x2000, REGION_GFX4 )      /* search light */
  435.     ROM_LOAD( "d2_67.bin",    0x0000, 0x1000, 0x2b693e42 )  /* layout */
  436.     ROM_LOAD( "d4_68.bin",    0x1000, 0x0800, 0xf3649264 )  /* mask */
  437.                             /*0x1800 -0x1fff will be filled in dynamically */
  438.  
  439.     ROM_REGION( 0x0800, REGION_GFX5 )      /* layer mask */
  440.     ROM_LOAD( "k4_73.bin",    0x0000, 0x0800, 0xfa6237e4 )
  441.  
  442.     ROM_REGION( 0x0300, REGION_PROMS )
  443.     ROM_LOAD( "dday.m11",     0x0000, 0x0100, 0xaef6bbfc )  /* red component */
  444.     ROM_LOAD( "dday.m8",      0x0100, 0x0100, 0xad3314b9 )  /* green component */
  445.     ROM_LOAD( "dday.m3",      0x0200, 0x0100, 0xe877ab82 )  /* blue component */
  446. ROM_END
  447.  
  448.  
  449. static void init_dday(void)
  450. {
  451.     dday_decode();
  452. }
  453.  
  454.  
  455. GAMEX( 1982, dday,  0,    dday, dday,  dday, ROT0, "Olympia", "D-Day", GAME_IMPERFECT_COLORS )
  456. GAMEX( 1982, ddayc, dday, dday, ddayc, dday, ROT0, "Olympia (Centuri license)", "D-Day (Centuri)", GAME_IMPERFECT_COLORS )
  457.